import { ActionReducerMap } from '@ngrx/store';

import { BasemapState, basemapsReducer } from './basemaps.reducer';
import { DataTableState, dataTableReducer } from './data-table.reducer';
import { DistrictsState, districtReducer } from './district.reducer';
import { FoldingReducer, FoldingState } from './folding.reducer';
import { MarkersState, markersReducer } from './markers.reducer';
import { MeasureState, measureReducer } from './measure.reducer';
import { PoisState, poisReducer } from './pois.reducer';
import { ZoomReducer, ZoomState } from './zoom.reducer';
import { SpatialQueryState, spatialQueryReducer } from './spatial-query.reducer';
import { DrawToolState, drawToolReducer } from './draw-tool.reducer';
import { LayersState, layersRedecuer } from './layers.reducer';
import { InteractionSelectState, interactionSelectReducer } from './interaction-select.reducer';
import { FeatureState , featureReducer } from './feature.reducer';

export interface MapState {
    pois: PoisState,
    districts: DistrictsState,
    zoom: ZoomState,
    folding: FoldingState,
    basemaps: BasemapState,
    dataTable: DataTableState,
    measure: MeasureState,
    marker: MarkersState,
    spatialQuery: SpatialQueryState,
    drawTool: DrawToolState,
    layers: LayersState,
    interactionSelect: InteractionSelectState,
    feature: FeatureState
}

export const reducers: ActionReducerMap<MapState> = {
    pois: poisReducer,
    districts: districtReducer,
    zoom: ZoomReducer,
    folding: FoldingReducer,
    basemaps: basemapsReducer,
    dataTable: dataTableReducer,
    measure: measureReducer,
    marker: markersReducer,
    spatialQuery: spatialQueryReducer,
    drawTool: drawToolReducer,
    layers: layersRedecuer,
    interactionSelect: interactionSelectReducer,
    feature: featureReducer
};

export * from './basemaps.reducer';
export * from './data-table.reducer';
export * from './district.reducer';
export * from './folding.reducer';
export * from './markers.reducer';
export * from './measure.reducer';
export * from './pois.reducer';
export * from './zoom.reducer';
export * from './spatial-query.reducer';
export * from './draw-tool.reducer';
export * from './interaction-select.reducer';
export * from './feature.reducer';